<template>
  <div id="topnav-view">
    <div class="content">
      <div class="topLeft">
        <div
          class="p"
          @click="showQuick"
          :class="{ active: currentStyle == '微聊' }"
        >
          微聊
        </div>
        <div
          class="p"
          @click="showNotice"
          :class="{ active: currentStyle == '通知' }"
        >
          通知
        </div>
      </div>
      <div class="topRight"></div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { defineProps, defineEmits } from "vue";
const props = defineProps({
  currentStyle: {
    type: String,
    default: "通知",
  }
});
const emit = defineEmits(["showQuick", "showNotice"]);

const showNotice = () => {
  emit("showNotice");
};
const showQuick = () => {
  emit("showQuick");
}
</script>

<style lang="scss" scoped>
.content {
  width: 90%;
  height: 50px;
  margin: 10px auto;
  display: flex;
  justify-content: space-between;
}
 
.topLeft {
  width: 40%;
  display: flex;
  line-height: 50px;
  justify-content: space-between;
}
 
.topRight {
  width: 40%;
}
 
.p {
  font-family: "黑体";
  cursor: pointer;
}
 
.active {
  font-size: 38px;
  font-weight: 700;
}
</style>   